print("车次\t\t出发站\t\t到达站\t\t出发日期\t\t出发时间\t\t到达时间\t\t历时时长")
che={
    "G1559":["北京南","天津南","11月08日","18:06","18:39","00:33"],
    "G1567":["北京南","天津南","11月08日","18:15","18:49","00:33"],
    "G8917":["北京南","天津南","11月08日","18:20","19:19","00:59"],
    "G203": ["北京南","天津南","11月08日","18:35","19:09","00:34"],
}

for key,value in che.items():
    print(key,end="\t")
    for ele in value:
        print(ele,end="\t\t")
    print()
cheCi=input("请输入要购买的车次:").upper()    #upper()  把小写字母变成大写  lower() 把大写字母变成小写
if cheCi  in che.keys():
    cheInfo=che.get(cheCi)
    people=input("请输入乘车人信息,如果是多位乘车人使用逗号隔开:")
    print(f"[12306]{people}购票成功,{cheInfo[2]}{cheCi}次,{cheInfo[0]}{cheInfo[3]}开")
else:
    print("你输入的车次不存在!!!")









